<template>
  <div class="container">
    <div class="title ">
      <h2>{{ data.title }}</h2>
      <div>
        <span>{{ data.createTime | parseTimeByString }}</span>
        <span class="username">{{ data.username }}</span>
        <span class="el-icon-view"></span>
        <span>{{ data.visits }}</span>
      </div>
    </div>
    <el-card>
      <div class="content" v-html="data.articleBody"></div>
    </el-card>
  </div>
</template>

<script>
export default {
  props: {
    data: {
      type: Object,
      required: true
    }
  },
  data() {
    return {}
  },
  created() {},
  methods: {}
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
.title {
  padding-bottom: 25px;
  border-bottom: 1px dashed #d0d0d0 !important;
}
.username {
  margin: 0 15px;
}
.el-icon-view {
  margin-right: 15px;
}
.content {
  width: 100%;
}
.container {
  width: 720px;
}
</style>
